package OT.shoufouni.serverThreads;

import org.andnav.osm.util.GeoPoint;
import org.andnav.osm.views.OpenStreetMapView;

import OT.shoufouni.gpsMaps.findRoute;
import OT.shoufouni.gpsMaps.routeLocation;
import android.content.Context;
import android.util.Log;

public class serverRouteQuaryThread extends Thread{
	private final findRoute callerActivity;
	   	Context ctx;
		OpenStreetMapView osmv;
		GeoPoint from;
		GeoPoint to;
	  
		public serverRouteQuaryThread(findRoute callerActivity, Context ctx,
			   OpenStreetMapView osmv,GeoPoint from,GeoPoint to) {
	      this.callerActivity = callerActivity;
	      this.ctx = ctx;
	      this.osmv = osmv;
	      this.from = from;
	      this.to = to; 
	    }
	   public void run() {
		   // connect to server and get the route points
		   callerActivity.responseDisplay(routeLocation.getInstance(ctx, osmv, from, to));
		   Log.d("serverRouteQuaryThread", "updating the root points");
	   }

}
